package cn.iune.erp.accounting;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.Version;

import com.justep.baas.data.RowState;



//资产负债表模板

@Entity
@Table(name = "SheetBalance")
@NamedQuery(name="SheetBalance.findAll", query="SELECT s FROM SheetBalance s")
public class SheetBalance {

	@Id
	@Column(length=32)
	private String fID;
	
	@Column(length=32)
	private String systemCode;
	@Column(length=4)
	private String billType;
	@Column(length=20)
	private String billTypeName;
	private Date orderDate;
	@Column(length=10)
	private String state;
	@Column(length=10)
	private String status;

	@Column(length=10)
	private String sheetCode;//科目编码
	@Column(length=50)
	private String sheetName;//科目名称
	@Column(length=256)
	private String sheetFullID;//全路径ID
	@Column(length=128)
	private String sheetFullCode;//全路径编码
	@Column(length=256)
	private String sheetFullName;//全路径名称
	
	//是否计入上一级（上一级项目汇总时包括此项目）
	private int countFlag = 0;
	//加还是减:1：加，-1：减；
	private int plusMinus = 1;
	
//	@Column(length=1024)
//	private String formula;//计算公式
	
	@Transient
	@Column(length=100)
	private String sDescribe;//描述
	
//	@Transient
//	@Column(precision=38,scale=2)
//	private BigDecimal debitPeriod;//本期借方金额
//	@Transient
//	@Column(precision=38,scale=2)
//	private BigDecimal creditPeriod;//本期贷方金额
	
//	@Transient
//	private int dob =  1;//余额方向
//	@Transient
//	@Column(length=4)
//	private String dobLabel;//余额方向
	@Transient
	@Column(precision=38,scale=2)
	private BigDecimal balanceEnd;//本期借方贷方金额（期末数/本月数）
	@Transient
	@Column(precision=38,scale=2)
	private BigDecimal balanceYearBegin;//年初借方贷方金额（年初数）
	@Transient
	@Column(precision=38,scale=2)
	private BigDecimal balanceYearEnd;//年末借方贷方金额（本年累计数）
	
	private int nodeLevel = 0;
	@Column(length=32)
	private String nodeKind;
	@Column(length=50)
	private String sortNo;
	@Column(length=32)
	private String fParent;
	
	@Column(length=255)
	private String comments;
	
	@Column(length=15)
	private String cUsercode;
	@Column(length=20)
	private String cUsername;//制单人
	private Timestamp cDatetime;
	@Column(length=15)
	private String tUsercode;
	@Column(length=20)
	private String tUsername;//审核人
	private Timestamp tDatetime;
	@Column(length=15)
	private String eUsercode;
	@Column(length=20)
	private String eUsername;//关单人
	private Timestamp eDatetime;
	
	@Column(length=65)
	private String userId;

	@Column(length=128)
	private String enterpriseNo;
	@Column(length=128)
	private String enterpriseName;

	@Version
	private int version = 0;
	
	@Transient//非持久字段
	private RowState rowState;
	public RowState getRowState() {
		return rowState;
	}
	public void setRowState(RowState rowState) {
		this.rowState = rowState;
	}


	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}


	public String getSystemCode() {
		return systemCode;
	}
	public void setSystemCode(String systemCode) {
		this.systemCode = systemCode;
	}
	public String getBillType() {
		return billType;
	}
	public void setBillType(String billType) {
		this.billType = billType;
	}
	public String getBillTypeName() {
		return billTypeName;
	}
	public void setBillTypeName(String billTypeName) {
		this.billTypeName = billTypeName;
	}
	public Date getOrderDate() {
		return orderDate;
	}
	public void setOrderDate(Date orderDate) {
		this.orderDate = orderDate;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getcUsercode() {
		return cUsercode;
	}
	public void setcUsercode(String cUsercode) {
		this.cUsercode = cUsercode;
	}
	public String getcUsername() {
		return cUsername;
	}
	public void setcUsername(String cUsername) {
		this.cUsername = cUsername;
	}
	public Timestamp getcDatetime() {
		return cDatetime;
	}
	public void setcDatetime(Timestamp cDatetime) {
		this.cDatetime = cDatetime;
	}
	public String gettUsercode() {
		return tUsercode;
	}
	public void settUsercode(String tUsercode) {
		this.tUsercode = tUsercode;
	}
	public String gettUsername() {
		return tUsername;
	}
	public void settUsername(String tUsername) {
		this.tUsername = tUsername;
	}
	public Timestamp gettDatetime() {
		return tDatetime;
	}
	public void settDatetime(Timestamp tDatetime) {
		this.tDatetime = tDatetime;
	}
	public String geteUsercode() {
		return eUsercode;
	}
	public void seteUsercode(String eUsercode) {
		this.eUsercode = eUsercode;
	}
	public String geteUsername() {
		return eUsername;
	}
	public void seteUsername(String eUsername) {
		this.eUsername = eUsername;
	}
	public Timestamp geteDatetime() {
		return eDatetime;
	}
	public void seteDatetime(Timestamp eDatetime) {
		this.eDatetime = eDatetime;
	}
	public String getfID() {
		return fID;
	}
	public void setfID(String fID) {
		this.fID = fID;
	}
	public String getfParent() {
		return fParent;
	}
	public void setfParent(String fParent) {
		this.fParent = fParent;
	}
	public int getNodeLevel() {
		return nodeLevel;
	}
	public void setNodeLevel(int nodeLevel) {
		this.nodeLevel = nodeLevel;
	}
	public String getNodeKind() {
		return nodeKind;
	}
	public void setNodeKind(String nodeKind) {
		this.nodeKind = nodeKind;
	}
	public String getSortNo() {
		return sortNo;
	}
	public void setSortNo(String sortNo) {
		this.sortNo = sortNo;
	}
	public String getEnterpriseNo() {
		return enterpriseNo;
	}
	public void setEnterpriseNo(String enterpriseNo) {
		this.enterpriseNo = enterpriseNo;
	}
	public String getEnterpriseName() {
		return enterpriseName;
	}
	public void setEnterpriseName(String enterpriseName) {
		this.enterpriseName = enterpriseName;
	}
	public String getComments() {
		return comments;
	}
	public void setComments(String comments) {
		this.comments = comments;
	}
	public String getSheetName() {
		return sheetName;
	}
	public void setSheetName(String sheetName) {
		this.sheetName = sheetName;
	}
	public String getSheetFullID() {
		return sheetFullID;
	}
	public void setSheetFullID(String sheetFullID) {
		this.sheetFullID = sheetFullID;
	}
	public String getSheetCode() {
		return sheetCode;
	}
	public void setSheetCode(String sheetCode) {
		this.sheetCode = sheetCode;
	}
	public String getSheetFullCode() {
		return sheetFullCode;
	}
	public void setSheetFullCode(String sheetFullCode) {
		this.sheetFullCode = sheetFullCode;
	}
	public String getSheetFullName() {
		return sheetFullName;
	}
	public void setSheetFullName(String sheetFullName) {
		this.sheetFullName = sheetFullName;
	}
	public String getsDescribe() {
		return sDescribe;
	}
	public void setsDescribe(String sDescribe) {
		this.sDescribe = sDescribe;
	}
	public int getCountFlag() {
		return countFlag;
	}
	public void setCountFlag(int countFlag) {
		this.countFlag = countFlag;
	}
	public int getPlusMinus() {
		return plusMinus;
	}
	public void setPlusMinus(int plusMinus) {
		this.plusMinus = plusMinus;
	}
	public BigDecimal getBalanceEnd() {
		return balanceEnd;
	}
	public void setBalanceEnd(BigDecimal balanceEnd) {
		this.balanceEnd = balanceEnd;
	}
	public BigDecimal getBalanceYearBegin() {
		return balanceYearBegin;
	}
	public void setBalanceYearBegin(BigDecimal balanceYearBegin) {
		this.balanceYearBegin = balanceYearBegin;
	}
	public BigDecimal getBalanceYearEnd() {
		return balanceYearEnd;
	}
	public void setBalanceYearEnd(BigDecimal balanceYearEnd) {
		this.balanceYearEnd = balanceYearEnd;
	}


	
	

}
